Home Java Docker
Home     Java

Java Topic

What is Java
History of Java
Freature of Java
Difference Between Java & C++
Java Environment Set Up
Java Hello World Program & its Internal Process
Java Hello World Program
JDK, JRE and JVM
Java Variables
Java Data Types & Unicode System
Java Operators
Java Keywords
Java Control Statements
Java if else
Java switch
Java for loop
Java While loop
Java Do While loop
Java break
Java continue
Java Oops Concept
Java Object & Class
Java Method
Java Constructor
Java Static Keyword
Java this Keyword
Java Inheritance
Java Hybrid Inheritance
Aggregation(HAS-A)
Java Polymorphism
Java method overloading
Java method overriding
Java Runtime polymorphism
Java Dynamic Binding
Super keyword
Final keyword
Difference Between method overloading and method overriding
Java Abstraction
Java Interface
Abstract class vs Interface
Java Encapsulation
Java Package
Java Access Modifiers
covariant return type
Instance initializer block
Java instanceof operator
Object Cloning in Java
Wrapper classes in Java
Java Strictfp Keyword
Recursion in Java
Java Command Line Arguments
Difference between object and class
Java String
Java String Class
Java Immutable String
Java Immutable Class
String Buffer
String Builder
String Buffer vs String
String Builder vs String Buffer
String Tokenizer in Java
Java Array
Java Exceptions Handling
Java Try-Catch block
Java Multiply Catch Block
Java Finally Block
Java Throws Keyword
Java Throw Keyword
Java Exception Propagation
Java Throw vs Throws
Final vs Finally vs Finalize
Exception Handling With Method Overridding
Java Multithreading
Lifecycle and States of a Thread in Java
How to create a thread in Java
Thread Scheduler in Java
Sleeping a thread in Java
Calling run() method
Joining a thread in Java
Naming a thread in Java
Thread Priority
Daemon Thread
Thread Pool
Thread Group
Shutdown hook
Multitasking vs Multithreading
Garbage Collection
RunTime Class
Java Synchronization
Synchronized block in Java
Static Synchronization in Java
Deadlock in Java
Inter Thread Communication in Java
Interrupting Thread in Java
Reentrant Monitor in Java
Java Applet
Animation in Applet
EventHandling in Applet
Display image in Applet
Displaying Graphics in Applet
Parameter in Applet
Java 8 Features
Java Lambda Expressions
Method References
Functional Interfaces
Java 8 Stream
Base64 Encode Decode
Default Method
for Each() Method
Collectors class
String Joiner Class
Optional Class
JavaScript Nashron
Parallel Array Sort
Type Interface
Parameter Reflection
Type and Repeating Annotations
JDBC Improvements

Difference Between C++ & Java ?

C++ Definition

    C++ is a general-purpose programming language developed at Bell Labs in 1979 by Danish computer scientist Bjarne Stroustrup as an expansion of the C programming language, sometimes known as "C with Classes."



Table Of Content

  • Definition
  • Comparison Chart
  • Key Differences

Features of C++

  • C++ is Case-sensitive language.
  • C++ is platform Dependent.
  • Source must be recompiled for every platform, that's why code is not portable
  • C++ is widely used for system programming




Java Definition

    Java is a very popular and high-level platform independent programming language
    Java was created in 1995 by Sun Microsystems (which is now a part of Oracle), and java run in more than 3 devices . The founder of Java is James Gosling, also known as the "Father of Java." Java is first known as oak. but Oak was already a recognised business so James Gosling and his colleagues decided to alter the name to Java.


    Features of Java

  • Java is Object-Oriented programming language.
  • Java is Platform Independent language.
  • Java language is Platform Independent language.
  • Java is Robust & Secure Programming language
  • Java is a dynamic language. It supports the dynamic loading of classes






Comparison Chart

Difference Between Java and C++ are mention below


S.N Basis for comparison C++ Java
1. Platform dependency C++ is platform Dependent Java is platform Independent
2. Programming Approach C++ uses the bottom-up approach Java also uses the bottom-up approach
3. Code Execution C++ code is executed directly Java code is executed by the JVM. It first converted into byte code then machine code
4. Constructor/ Destructor C++ supports both constructor and destructor Java supports constructors only
5. Overloading C++ support method and operator overloading. Java support method but it does not support operator overloading.
6. Uses C++ is widely used for system programming Java is used to develop web applications, mobile applications, and windows applications
7. Portability Source must be recompiled for every platform, that's why code is not portable Java is very portable programming language. Java code can be reused i.e write once, run anywhere it give portablity you to carry the Java bytecode to any platform.
8. Dynamic or Static C++ is a static programming language Java is a dynamic programming languagee
9. Array Size In C++ array should be declared with size In Java array can be declared without declaring the size
10. Libraries Predominantly low-level functionality Massive, classes for high-level services
11. Memory management In C++ memory is Accessible to programmer In Java memory is in System controlled
12. Runtime error detection In C++ runtime error detection is Programmer responsibility In Java runtime error detection is System responsibility. Java uses exception handling to handle run time error
13. Supports C++ supports Pointers, structure and Union Java does not supports Pointers, structure and Union

The Most Significant Differences Between C++ and Java

  • Java is platform agnostic, whereas C++ is platform dependant.
  • In C++, objects have fixed addresses and the programmer manages memory. on the other hand, Java offers system-controlled memory management and objects that can be relocated in memory.
  • C++ allows both single and multiple inheritance, however Java does not allow for multiple inheritance and instead relies on abstract interfaces.
  • Polymorphism is handled automatically in Java. In C++, polymorphism is declared explicitly for each method.



  • In C++, there is no universal base class, however there is a universal object ancestor in Java.
  • C++ does not provide portability, unlike Java does.
  • The semantics of primitive and object types in C++ are consistent. In Java, the semantics of primitive and object types diverge.
  • Java classes contain all functions and data. C++, permits any class to have external functions and data.
  • C++ libraries give low-level functionality but a rich generic (template) container (data structure) and algorithm, whereas Java libraries provide large classes for high-level services and system integration.
  • A programmer is responsible for detecting runtime defects, which leads in undefined behaviour during runtime. In Java, , the system is in charge of detecting runtime problems, which result in compile time or runtime termination.


Java Environment Setup Next »
« Perv Next »


Post your comment





Read Next Topic
Java Tutorial - Topic
What is Java
History of Java
Freature of Java
Difference Between Java & C++
Java Environment Set Up
Java Hello World Program & its Internal Process
JDK, JRE and JVM
Java Variables
Java Data Types & Unicode System
Java Operators
Java Keywords
Java Naming Convention
Read Other Java Chapter
Java Topic
Java Basic Tutorial
Java Control Statements
Java Classes & Object
Java Inheritance
Java Polymorphism
Java Abstraction
Java Encapsulation
Java OOPs Miscellaneous
Java Array
Java String
Java Exception Handling
Java Multithreading
Java Synchronization
Java Applet
Java 8 Features
Java 9 Features
Java Collection
Java Mcq
Java Interview Question
Tools
  

Useful Links

  • Home
  • Blog
  • About us
  • Contact Us
  • Privacy policy

Contact Us

Police Colony
Patna, Bihar
India

Email:

About DockerTpoint


India's largest site for Programming Tutorial as well as BANK, SSC, RAILWAY exam
and Campus placement preparation.